<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./vue.js"></script>
  </head>
  <body>
    <div id="app">
      <lisi></lisi>
    </div>
    <script>
      var vm = new Vue({
        el: '#app',
        // 捕获错误的钩子
        errorCaptured (err, vm, info) {
          console.log(err, vm, info, 1111111)
          return false 
        },
        components:{
          lisi: {
            template: `<div>有情人终成眷属，没钱人亲眼目睹</div>`,
            created() {
              throw new Error('我是lisi组件，我自首')
            }
          }
        }
      });
    </script>
  </body>
</html>
